type DescribableFunction = {
  description: string;
  (someArg: number): void;
};
function doSomething(fn: DescribableFunction) {
  console.log(fn.description + "  " + fn(6));
}

function myFunc(someArg: number) {
  console.log(someArg);
}
//   函数的签名
myFunc.description = "default description";

doSomething(myFunc);




// 调用签名
interface descriptionAble<T> {
  description: string;
  (someArg: T): T;
}

function descriptionAbleFn(fn: descriptionAble<string>) {
  fn("asdsadasdasd");
}

function descriptionAbleFn2(playload: string) {
  console.log(playload, "我是string");
  return playload;
}
descriptionAbleFn2.description = "sad";
descriptionAbleFn(descriptionAbleFn2);

